package com.miplus.ccrm.admin.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.miplus.ccrm.admin.controller.vo.GrpUserResVo;
import com.miplus.ccrm.admin.controller.vo.NamesResVo;
import com.miplus.ccrm.admin.controller.vo.UserInfoReqVo;
import com.miplus.ccrm.admin.controller.vo.UserInfoResVo;
import com.miplus.ccrm.admin.pojo.SysNames;
import com.miplus.ccrm.admin.pojo.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
* @author pc
* @description 针对表【sys_user(系统用户表)】的数据库操作Mapper
* @createDate 2024-02-22 20:28:53
* @Entity com.miplus.ccrm.admin.pojo.SysUser
*/
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    List<String> getPermissionByUsrId(String $usrid);

    List<String> getMgrGrpId(String $usrid);

    IPage<UserInfoResVo> systemUserSelect(Page<Object> objectPage, String $usrid, UserInfoReqVo paras);

    HashMap<String, Object> getRoleMgrGroup(String usrid);

    String getPwd(String usrid);

    List<NamesResVo> getActiveUserList(@Param("grpid") String grpid);
    List<GrpUserResVo> getActiveUserListGrp(@Param("grpid") String grpid);
    List<GrpUserResVo> groupUserList(String userid);

    SysUser getUser(String usrid);

    int updateGroups(String usrid,String grpid);
}


